/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title 披萨测试
 * @Description 工厂方法模式
 * @Package designmodel.factorymodel2.ex2
 * @date 2021/3/9 11:33 上午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package designmodel.factorymodel2.ex2;

import designmodel.factorymodel2.ex2.factory.NYPizzaStore;
import designmodel.factorymodel2.ex2.factory.PizzaStore;
import designmodel.factorymodel2.ex2.model.Pizza;

import java.text.MessageFormat;

public class PZTest {

    public static final String CHEESE = "cheese";
    public static final String PEPPERON = "pepperon";

    public static void main(String[] args) {
        PizzaStore pizzaStore = new NYPizzaStore();
        Pizza c_pizza = pizzaStore.orderPizza(CHEESE);
        Pizza p_pizza = pizzaStore.orderPizza(PEPPERON);

        System.out.println(MessageFormat.format("{0}准备好啦!", c_pizza.getName()));
        System.out.println(MessageFormat.format("{0}准备好啦!", p_pizza.getName()));

    }
}
